/*!
\copyright  Copyright (c) 2023 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief      List interface definition
*/

#ifndef LIST_INTERFACE_H_
#define LIST_INTERFACE_H_

#include "list.h"

typedef struct list_interface_t {
    void*                   (*ListCreate)(const list_config_t* config);
    void                    (*ListDestroy)(void* *list);
    void                    (*ListPrependWithSize)(void* list, void* element, size_t size);
    void                    (*ListAppendWithSize)(void* list, void*  element, size_t size);
    void                    (*ListPrepend)(void* list, void* element);
    void                    (*ListAppend)(void* list, void*  element);
    void                    (*ListDeleteNode)(void* list, void** node);
    bool                    (*ListIsEmpty)(void* list);
    void*                   (*ListGetHead)(void* list);
    void*                   (*ListGetTail)(void* list);
    void*                   (*ListGetNext)(void* list, void* node);
    void*                   (*ListGetElement)(void* list, void* node);
    size_t                  (*ListGetElementSize)(void* list, void* node);
    const list_config_t*    (*ListGetConfig)(void* _list);
} list_interface_t;


const list_interface_t* ListGetInterface(list_type_t list_type);

#endif /* LIST_INTERFACE_H_ */
